import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

let app = createApp(App)

// 创建一个全局状态存储
const store = {
  message: ''
}

if (window.__POWERED_BY_WUJIE__) {
  window.__WUJIE_MOUNT = () => {
    app = createApp(App)
    app.use(router)
    app.config.globalProperties.$store = store
    app.mount('#app')
  }
  window.__WUJIE_UNMOUNT = () => {
    app.unmount()
  }
} else {
  app.use(router)
  app.mount('#app')
} 